import service from '../axios/index'

// 新增合同模板数据
function addTemplateList (data) {
  return service({
    url: '/mweb/contract/addNewContract',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data
  })
}

// 删除合同模板数据
function removeTemplateList (data) {
  return service({
    url: '/mweb/contract/removeContract',
    method: 'post',
    data
  })
}

// 修改合同模板数据
function reviseTemplateList (data) {
  return service({
    url: '/mweb/contract/updateContractWithoutFile',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data
  })
}
function newsreviseTemplateList (data) {
  return service({
    url: '/mweb/contract/updateContract',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data
  })
}
// 查询合同模板数据
function queryTemplateList (data) {
  return service({
    url: '/mweb/contract/selectContract',
    method: 'post',
    data
  })
}

// 查询合同模板可选参数
function getParamsList (data) {
  return service({
    url: '/mweb/contract/selectContractParamsByScopeId',
    method: 'post',
    data
  })
}
// 查询合同模板可选参数
function getscopedataapi (data) {
  return service({
    url: '/mweb/contract/selectContractScopeList',
    method: 'post',
    data
  })
}
// 查询合同模板可选参数
function viewdocx (data) {
  return service({
    url: '/mweb/contract/preview',
    method: 'post',
    data
  })
}
function getoptionlist (data) {
  return service({
    url: 'mweb/contract/selectContractRulesListByContractNo',
    method: 'post',
    data
  })
}
function getbase (data) {
  return service({
    url: 'mweb/contract/selectContractPathByContractId',
    method: 'post',
    data
  })
}
export { addTemplateList, removeTemplateList, reviseTemplateList, queryTemplateList, getParamsList, getscopedataapi, viewdocx, getoptionlist, getbase, newsreviseTemplateList }
